using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI.WebControls;
using btnet;

/// <summary>
/// Summary description for tasks_all
/// </summary>
public partial class tasks_all : System.Web.UI.Page
{
    protected DataSet ds_tasks;
    protected Security security;

    void Page_Init (object sender, EventArgs e) {ViewStateUserKey = Session.SessionID;}

    void Page_Load(Object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            String footer_label = null;
            if (Application["custom_footer"] != null)
            {
                footer_label = (String)Application["custom_footer"];
            }
            custom_footer_label.Text = footer_label;
        }

	    Util.do_not_cache(Response);
	
	    security = new Security();
	    security.check_security( HttpContext.Current, Security.ANY_USER_OK);
	
	    titl.InnerText = Util.get_setting("AppTitle","BugTracker.NET") + " - "
			    + "all tasks";
	
	    if (security.user.is_admin || security.user.can_view_tasks)
	    {
		    // allowed
	    }
	    else
	    {
		    Response.Write("You are not allowed to view tasks");
		    Response.End();
	    }
	
	    ds_tasks = btnet.Util.get_all_tasks(security,0);
    }
}